small and min function difference